<%@page import="java.net.URLDecoder"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
		 pageEncoding="UTF-8"%>
<%@ page isELIgnored="false"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE html>

<html>
<head>
	<meta charset="UTF-8">
	<title>订单列表</title>
	<style>
		*{
			margin: 0;
			padding: 0;
		}
		.box{
			width:100%;
			height:46px;
			background-color:lightskyblue;
			box-shadow: 1px 1px 1px #E0E0E0;
			margin-bottom: 2px;
		}
		.box_center{
			width:1200px;
			height: 100%;
			margin: 0 auto;

		}
		a{
			text-decoration:none;
		}

		.box_center_b{
			width:100%;
			height: 45px;

		}
		.box_center_b ul{
			margin-left: 200px;
			text-align: center;

		}
		.box_center_b li{
			list-style:none;
			float:left;
			margin-left:80px;
			color:#666;
			font-family: "微软雅黑";
			font-size: 16px;
			margin-top: 19px;

		}

		.box_center_b a {
			width: 100px;
			height: 28px;
			color: #666;
			text-align: center;
		}
		.box_center_b a:hover {
			cursor:pointer;
			color:#136fb8;
			text-align: center;
			text-decoration: none;
			border-bottom: 1px solid #136fb8;
		}

		.a2{
			float:left;
			line-height: 5px;
		}
		.box1{
			width: 500px;
			height:50px;
			margin: 0 auto;
		}
		.box2{

			width: 300px;
			float: left;
			margin-left: 20px;
			border:1px solid #dddddd;
		}

		.box2 li{
			list-style: none;
			margin-left:80px;
			color:#666;
			font-family: "微软雅黑";
			font-size: 16px;
			margin-top: 20px;
			line-height: 40px;
		}
		.box2 a{
			margin-left:80px;
			color:#666;
			font-family: "微软雅黑";
			font-size: 16px;
			margin-top: 20px;
		}
		.box2_b{
			width: 100%;
			height: 300px;

		}
		.box2_b img{
			margin-top: 20px;
		}
		.box2_bb{
			margin-top: 20px;

		}
		.box2_bb p{
			color: #FF6700;
			line-height: 20px;
			margin-left: 20px;
			margin-top: 20px;
		}
		.box3{
			/*margin-left: -30px;*/
			width: 1000px;
			height:500px;
			/*float: left;*/
		}

		/*table { border-collapse:collapse; }*/
		td{
			padding: 10px;
		}
	</style>

	<script type="text/javascript" src="${pageContext.request.contextPath}/js/jquery-3.2.1.js"></script>
	<script type="text/javascript">
		//jquery的入口函数。  2.文档加载完毕，图片不加载的时候就可以执行这个函数。
		$(function () {
			$("#save").click(function () {
				$("#userForm").submit()
			})
		});
	</script>
</head>
<body>
<div class="box">
	<div class="box_center">
		<a href="index" style="line-height: 45px;float: left">返回</a>
	</div>
</div>
<div class="box3" style="text-align: center;margin: 0 auto">

	<table border="1px" cellspacing="0px" style="border-collapse:collapse">
		<tr>
			<th>订单编号</th>
			<th>图片</th>
			<th>名称</th>
			<th>用户名</th>
			<th>数量</th>
			<th>单价</th>
			<th>操作</th>
		</tr>
		<c:forEach var="list" items="${list}">
			<tr>
				<td>${list.orderId}</td>
				<td><img src="${list.picture}" /></td>
				<td>
					<span>${list.bookName}</span>
				</td>
				<td>
					<span>${list.userName}</span>
				</td>
				<td>
					<span>${list.quantity}</span>
				</td>
				<td>
					<span>￥${list.price}</span>
				</td>
				<td>
					<a href="/deleteOrderByOrderId?orderId=${list.orderId}" style="margin-left: 10px">删除</a>
				</td>
			</tr>
		</c:forEach>

	</table>
</div>
</body>
</html>